package org.budo.phone.api.util;

import java.util.HashMap;
import java.util.Map;

import org.budo.phone.api.CallCenterTier;

/**
 * @author lmw
 */
public class CallCenterTierUtil {
    public static Map<String, String> agentStateMap(Map<String, Object> tiers) {
        if (null == tiers) {
            return null;
        }

        Map<String, String> map = new HashMap<String, String>();
        for (Object each : tiers.values()) {
            CallCenterTier tier = (CallCenterTier) each;
            String agent = tier.getAgent();
            String state = tier.getState();
            map.put(agent, state);
        }
        return map;
    }
}